package com.lsa.skienna.challenge.chap9.the110902_PlayingWithWheels;

import java.util.Comparator;
import java.util.PriorityQueue;
import java.util.Queue;

public class C {

    /**
     * @param args
     */
    public static void main(String[] args) {
        Queue<Integer> frontier = new PriorityQueue<Integer>(10, new Comparator<Integer>() {
            @Override
            public int compare(Integer o1, Integer o2) {
                return o1 - o2;
            }
        });
        frontier.add(10);
        frontier.add(3);
        frontier.add(7);
        
        while(!frontier.isEmpty()) {
            final Integer c = frontier.poll();
            System.out.println(c);
        }
    }
}
